
import request from '../request.js'

const api = {
	login: '/app/user/login',
	register: '/app/user/register',
	update : '/app/user/update-info',
	id: '/app/user/user-info/id='
}

/* 用户登录
 */
export function userLogin(formData){
	return request({
		url: api.login,
		method: 'POST',
		data: formData
	})
}

/* 用户注册
 */
export function userRegister(formData){
	return request({
		url: api.register,
		method: 'POST',
		data: formData
	})
}
/* 用户修改信息
 */
export function editUserInfo(formData){
	return request({
		url: api.update,
		method: 'POST',
		data: formData
	})
}

/* 根据用户id查询信息
 */
export function getUserInfoById(id){
	return request({
		url: api.id + id,
		method: 'GET'
	})
}